Enchanted Forest || Codeforces Round 796 Div2 Problem D